package cn.medemede.springbootdemo1.domain;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.validation.constraints.Min;

@Component
@ConfigurationProperties(prefix = "girl")
public class GirlBean {

    @Min(value = 18, message = "未成年少禁止入内")  //数据合法性验证
    private int age;

    private String cupSize;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCupSize() {
        return cupSize;
    }

    public void setCupSize(String cupSize) {
        this.cupSize = cupSize;
    }

    @Override
    public String toString() {
        return "GirlBean{" +
                "age=" + age +
                ", cupSize='" + cupSize + '\'' +
                '}';
    }
}
